1. Field of the Invention
The present invention relates to a data conversion apparatus for converting index data to real data and to an image generation apparatus for converting, for example, index texture data to real texture data by the data conversion to make it possible to suitably carry out texture mapping.
2. Description of the Related Art
When storing a large amount of data such as, for example, image data in a computer or other processing apparatus, to make effective use of the limited storage region of the apparatus, it is preferable to reduce the amount of data stored. As a general method for reducing the amount of data for this purpose, there is the method of using index data.
In this method, actual data (hereinafter referred to as "actual data" or "real data") is given a number expressed by a smaller bit width than the data bit width. By storing data by such numbers, it is possible to store the data by a smaller amount of data than that by directly storing the actual data. The numbers given to the actual data are referred to as "indexes", and the data converted to a format referred to by indexes is referred to as "index data".
When using index data, it is necessary to store both a list establishing correspondence between the index data and the real data, that is, an index table and the data expressed by the index data in the processing apparatus. However, usually the decrease of the amount of data caused due to the use of the index data is overwhelmingly larger than the increase of the amount of data caused due to the storage of the index table, therefore the amount of data can be greatly reduced as a whole.
When the method of storage using index data is applied to image data, the image data is stored in the form of index-data inside the processing apparatus. When displaying the image data on a display or otherwise outputting the image data to the outside, the index data is converted to real data for output. The conversion of the index data to the real data must be carried out at a high speed in accordance with, for example, the speed of display of the display device. Therefore, usually this data conversion processing is frequently carried out by data conversion apparatus constituted by hardware.
Specifically, the data conversion apparatus is constituted by using, for example, a memory. When the index is input as an address, the converted real data is output as the output data.
An example of such a data conversion apparatus constituted by a memory is shown in FIGS. 1A and 1B.
FIG. 1A is a view of a data conversion apparatus constituted by a memory for converting 3-bit index data to 32-bit real data. The content of the index data stored in this memory is shown in FIG. 1B.
In a field of computer graphics, color image data consisting of a very large amount of data is processed, therefore processing by "index color" expressing color data using indexes is frequently utilized.
"Processing by index color" means processing which defines index color data of for example 4 bits, 8 bits, and 16 bits for real color data of 24 bits comprised by for example 8 bits each of R, G and B by the number of required specified colors, maintains an index table corresponding to the index color data, and converts index color data to real color data.
For processing using computer graphics, there are many applications where there are no problems in actual use even if used while limiting the number of colors. In such a case, processing by index color is being used even more.
A data conversion apparatus for converting this index color data to real color data at a high speed is referred to as a "color look-up table" since it converts color data.
When using such index data, the types of usable data are limited by the number of entries of the index table. However, in some applications, there are cases where it is desired to use a larger amount of data than the number of entries of the index table. Therefore, in such a case, the methods of rewriting the index table for use or providing a plurality of index tables and using the same by switching in accordance with the situation are usually used. The method of rewriting of the index table, however, causes a reduction in the processing speed by an amount corresponding to the rewriting time. Therefore, in general the method of providing many index tables within a range allowed by the storage region of the memory of the data conversion apparatus is adopted.
Even if a plurality of index tables are provided due to such a method, there is no change in the fact that the types of data which can be used at each point of time are limited by the number of entries of the selected index table, but by providing many index tables and using them by appropriately switching in a series of continuous processing, substantially a large amount of data is used when seen from the standpoint of the application.
In this way, in processing by index data, provision of many index tables is becoming one of the most important factors in actual use.
Further, when using such index data, the bit width of the data output from the index table, that is, the precision of the index table, is also becoming important.
The requests on the data precision of an index table differ according to application. There are a variety of requests. For example, some require data precision, while others do not. When taking as an example the field of computer graphics, in CADs for graphic design, for example, the ability to display fine differences in the tone of colors is very important for designers and a high precision is required for the data of the index table. In the case of CADs for mechanical design, however, it is sufficient so far as parts can be discriminated by color and fine differences of colors of individual parts are not so important.
In this way, in processing using index data, the number of entries and the precision of the index table are very important items.
In the data conversion apparatuses heretofore, however, there has been a one-to-one correspondence between entries and addresses of the memory. The precision of the index table has corresponded to the data bit width of the memory and has been substantially fixed, so could not be adjusted corresponding to the application etc.
For this reason, there are many cases where the precision of the index table is set in advance so as to become a precision that can be also applied to applications for which a relatively high precision is required. Namely, in many cases each data has a certain longer bit width. As a result, even in a case of use with an application where not that high a precision is required, the processing is carried out with an index table having a precision of more than required.
Further, the number of entries is preferably made as large as possible, but an increase of the number of entries leads to an increase of the capacity of the memory which ends up being used. Therefore usually it cannot be sufficiently increased in many cases.
Namely, in the data conversion apparatuses heretofore, there tended to be the disadvantage that the number of entries was not sufficient despite the unnecessarily high precision etc., so there was a disadvantage in that it was difficult to effectively use the memory and carry out the processing using suitable indexes for the application.
As a result, in various processing apparatuses to which such a data conversion apparatus is applied, there has been a disadvantage in that suitable processing could not be carried out.
For example, when this data conversion apparatus is applied to processing for generating an image etc., the disadvantages having arisen that the number of usable colors has not been sufficient and therefore discrimination by color could not be suitably achieved and that the display of fine tones of color was not possible and therefore the desired image could not be displayed.